﻿<%@ Page Title="Complex data structures - multiple choice" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="MultipleChoicePage.aspx.cs" Inherits="BM.Tools.WebControls.MForm.Example.Structures.MultipleChoicePage" %>

<%@ Register Assembly="BM.Tools.WebControls.MForm" Namespace="BM.Tools.WebControls.MForm.Controls"
    TagPrefix="mf" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Demonstration" runat="server">
    <asp:XmlDataSource ID="XmlDataSource1" runat="server">
        <Data>
            <MultipleChoice xsi:noNamespaceSchemaLocation="ComplexDataStructures.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	            <OtherChild>
		            <TextField>text</TextField>
	            </OtherChild>
	            <SomeChild>
		            <NumericField>5</NumericField>
	            </SomeChild>
	            <OtherChild>
		            <TextField>other text</TextField>
	            </OtherChild>
            </MultipleChoice>
        </Data>
    </asp:XmlDataSource>
    <mf:RootValidator runat="server" ControlToValidate="Root1" />
    <mf:Root ID="Root1" runat="server" Name="Root1" DataSourceID="XmlDataSource1" >
        <UriMappings>
            <mf:UriMapping Namespace="http://www.w3.org/2001/XMLSchema" Prefix="xs" />
            <mf:UriMapping Namespace="" Prefix="" />
        </UriMappings>
        <Contents>
            <mf:Branch runat="server" Name="MultipleChoice">
                <Contents>
                    <mf:Choice runat="server" MaxOccurs="4" Name="Ch1" Ordinal="1">
                        <Contents>
                            <mf:Branch runat="server" Name="OtherChild" Ordinal="1">
                                <Contents>
                                    <mf:Leaf runat="server" Name="TextField" Ordinal="1">
                                    </mf:Leaf>
                                </Contents>
                            </mf:Branch>
                            <mf:Branch runat="server" Name="SomeChild" Ordinal="2">
                                <Contents>
                                    <mf:Leaf runat="server" DataType="Int" Name="NumericField" Ordinal="1">
                                    </mf:Leaf>
                                </Contents>
                            </mf:Branch>
                        </Contents>
                    </mf:Choice>
                </Contents>
            </mf:Branch>
        </Contents>        
    </mf:Root>
</asp:Content>
